<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

    <div>
        <form action="/book/addOrUpdateBook" method="post" enctype="multipart/form-data">
            <table border="1" cellpadding="0" cellspacing="0">
                <tr>
                    <td colspan="2">
                        <h2>新增图书</h2>
                    </td>
                </tr>
                <tr>
                    <td>书名：</td>
                    <td><input type="text" name="name" required></td>
                </tr>
                <tr>
                    <td>库存：</td>
                    <td><input type="text" name="pnum" required></td>
                </tr>
                <tr>
                    <td>价格：</td>
                    <td><input type="text" name="price" required></td>
                </tr>
                <tr>
                    <td>类目</td>
                    <td><input type="text" name="category" required></td>
                </tr>
                <tr>
                    <td>说明</td>
                    <td><input type="text" name="description" required></td>
                </tr>
                <tr>
                    <td>图片</td>
                    <td>
                        <input type="file" name="file" >
                        <span style="color: red" th:text="${error}"></span>
                    </td>
                </tr>
                <tr>
                    <td>作者</td>
                    <td><input type="text" name="author" required></td>
                </tr>
                <tr>
                    <td>已售</td>
                    <td><input type="text"  name="sales" required></td>
                </tr>
                <tr>
                    <td colspan="2">
                        <input type="submit" value="新增">
                        <input type="button" value="返回" onclick="window.history.go(-1)">
                    </td>
                </tr>
            </table>
        </form>
    </div>

</body>
</html>